// 自动生成模板Feedback
package feedback

import (
	"gitcode.com/G-YT/iHealth25/server/global"
	"gitcode.com/G-YT/iHealth25/server/model/user"
	"gorm.io/datatypes"
)

// Feedback 结构体
type Feedback struct {
	global.GVA_MODEL
	Title       string         `json:"title" form:"title" gorm:"column:title;comment:标题;size:191;"`
	Content     string         `json:"content" form:"content" gorm:"column:content;comment:内容;size:191;type:text;"`
	Img         datatypes.JSON `json:"img" form:"img" gorm:"column:img;comment:图片;size:191;"`
	UID         *uint          `json:"u_id" form:"u_id" gorm:"column:u_id;comment:用户ID;size:191;"`
	User        user.User      `json:"-" gorm:"foreignKey:UID;references:ID"`
	Status      *bool          `json:"status" form:"status" gorm:"column:status;comment:回复状态;"`
	AdoptStatus *bool          `json:"adoptStatus" form:"adoptStatus" gorm:"column:adopt_status;comment:采纳状态;"`
	Reply       string         `json:"reply" form:"reply" gorm:"column:reply;comment:回复;type:text;"`
	Reply_img   datatypes.JSON `json:"reply_img" form:"reply_img" gorm:"column:reply_img;type:json;comment:回复图片;"`
}

// TableName Feedback 表名
func (Feedback) TableName() string {
	return "fd_feedback"
}
